/*
//
//              INTEL CORPORATION PROPRIETARY INFORMATION
//  This software is supplied under the terms of a license  agreement or
//  nondisclosure agreement with Intel Corporation and may not be copied
//  or disclosed except in  accordance  with the terms of that agreement.
//    Copyright (c) 2007-2008 Intel Corporation. All Rights Reserved.
//
//
*/

#ifndef __UMC_AVS_ENC_STREAM_COPIER_H
#define __UMC_AVS_ENC_STREAM_COPIER_H

#include "umc_avs_context.h"
#include "umc_avs_sequence_header.h"

namespace UMC
{

class AVSStreamCopier
{
public:
    // Default constructor
    AVSStreamCopier(void);
    // Destructor
    virtual
    ~AVSStreamCopier(void);

    // Initialize the object
    virtual
    Status Init(void);

    // Set working parameters
    inline
    void SetCopyContext(AVS_COPY_CONTEXT &cpyCtx);
    // Get working parameters
    inline
    AVS_COPY_CONTEXT & GetCopyContext(void);

    // Copy frame to destination buffer
    Status CopyFrame(void);

protected:
    // Release the object
    void Release(void);

    AVS_COPY_CONTEXT m_cpyCtx;                                  // (AVS_COPY_CONTEXT) copy context

    Ipp32u m_numFrames;                                         // (Ipp32u) number of processed frames
    Ipp32u m_seqHeaderPeriod;                                   // (Ipp32u) period of sequence header
    Ipp32u m_lastSeqHeaderNum;                                  // (Ipp32u) number of latest frame with sequence header

    AVS_SEQUENCE_HEADER m_seqHeader;                            // (AVS_SEQUENCE_HEADER) latest sequence header
};

inline
void AVSStreamCopier::SetCopyContext(AVS_COPY_CONTEXT &cpyCtx)
{
    m_cpyCtx = cpyCtx;

} // void AVSStreamCopier::SetCopyContext(AVS_COPY_CONTEXT &cpyCtx)

inline
AVS_COPY_CONTEXT & AVSStreamCopier::GetCopyContext(void)
{
    return m_cpyCtx;

} // AVS_COPY_CONTEXT & AVSStreamCopier::GetCopyContext(void)

} // namespace UMC

#endif // __UMC_AVS_ENC_DATA_COPIER_H
